package com.javasm.mingming.common.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;

/**
 * @author javasm
 * @version 0.1
 * @className WebSocketConfig
 * @descriptioin: 开启WebSocket支持
 * @date 2025/1/20 15:02
 * @since jdk11
 */
@Configuration
public class WebSocketConfig {


    //Bean注册,自动扫描 @ServerEndpoint注解声明的web socket Endpoint(端点)
    //注册为 websocket的 bean对象
    @Bean
    public ServerEndpointExporter serverEndpointExporter(){
        return new ServerEndpointExporter();
    }
}
